package com.shujia.scala;

import com.alibaba.fastjson.JSON;

public class Demo14Json {
    public static void main(String[] args) {
        Demo7JavaUser user = new Demo7JavaUser("张三", 23, "男");
        //将一个对象转换成json字符串
        String jsonStr = JSON.toJSONString(user);
        System.out.println(jsonStr);
    }
}
